// Code generated by mockery v1.0.0. DO NOT EDIT.

// Regenerate this file using `make store-mocks`.

package mocks

import (
	model "github.com/mattermost/mattermost-server/v5/model"
	store "github.com/mattermost/mattermost-server/v5/store"
	mock "github.com/stretchr/testify/mock"
)

// ChannelStore is an autogenerated mock type for the ChannelStore type
type ChannelStore struct {
	mock.Mock
}

// AnalyticsDeletedTypeCount provides a mock function with given fields: teamId, channelType
func (_m *ChannelStore) AnalyticsDeletedTypeCount(teamId string, channelType string) (int64, *model.AppError) {
	ret := _m.Called(teamId, channelType)

	var r0 int64
	if rf, ok := ret.Get(0).(func(string, string) int64); ok {
		r0 = rf(teamId, channelType)
	} else {
		r0 = ret.Get(0).(int64)
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
		r1 = rf(teamId, channelType)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// AnalyticsTypeCount provides a mock function with given fields: teamId, channelType
func (_m *ChannelStore) AnalyticsTypeCount(teamId string, channelType string) (int64, *model.AppError) {
	ret := _m.Called(teamId, channelType)

	var r0 int64
	if rf, ok := ret.Get(0).(func(string, string) int64); ok {
		r0 = rf(teamId, channelType)
	} else {
		r0 = ret.Get(0).(int64)
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
		r1 = rf(teamId, channelType)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// AutocompleteInTeam provides a mock function with given fields: teamId, term, includeDeleted
func (_m *ChannelStore) AutocompleteInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
	ret := _m.Called(teamId, term, includeDeleted)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, string, bool) *model.ChannelList); ok {
		r0 = rf(teamId, term, includeDeleted)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok {
		r1 = rf(teamId, term, includeDeleted)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// AutocompleteInTeamForSearch provides a mock function with given fields: teamId, userId, term, includeDeleted
func (_m *ChannelStore) AutocompleteInTeamForSearch(teamId string, userId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
	ret := _m.Called(teamId, userId, term, includeDeleted)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, string, string, bool) *model.ChannelList); ok {
		r0 = rf(teamId, userId, term, includeDeleted)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string, string, bool) *model.AppError); ok {
		r1 = rf(teamId, userId, term, includeDeleted)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// ClearAllCustomRoleAssignments provides a mock function with given fields:
func (_m *ChannelStore) ClearAllCustomRoleAssignments() *model.AppError {
	ret := _m.Called()

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func() *model.AppError); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// ClearCaches provides a mock function with given fields:
func (_m *ChannelStore) ClearCaches() {
	_m.Called()
}

// ClearSidebarOnTeamLeave provides a mock function with given fields: userId, teamId
func (_m *ChannelStore) ClearSidebarOnTeamLeave(userId string, teamId string) *model.AppError {
	ret := _m.Called(userId, teamId)

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
		r0 = rf(userId, teamId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// CountPostsAfter provides a mock function with given fields: channelId, timestamp, userId
func (_m *ChannelStore) CountPostsAfter(channelId string, timestamp int64, userId string) (int, *model.AppError) {
	ret := _m.Called(channelId, timestamp, userId)

	var r0 int
	if rf, ok := ret.Get(0).(func(string, int64, string) int); ok {
		r0 = rf(channelId, timestamp, userId)
	} else {
		r0 = ret.Get(0).(int)
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, int64, string) *model.AppError); ok {
		r1 = rf(channelId, timestamp, userId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// CreateDirectChannel provides a mock function with given fields: userId, otherUserId
func (_m *ChannelStore) CreateDirectChannel(userId *model.User, otherUserId *model.User) (*model.Channel, error) {
	ret := _m.Called(userId, otherUserId)

	var r0 *model.Channel
	if rf, ok := ret.Get(0).(func(*model.User, *model.User) *model.Channel); ok {
		r0 = rf(userId, otherUserId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Channel)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(*model.User, *model.User) error); ok {
		r1 = rf(userId, otherUserId)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// CreateInitialSidebarCategories provides a mock function with given fields: userId, teamId
func (_m *ChannelStore) CreateInitialSidebarCategories(userId string, teamId string) error {
	ret := _m.Called(userId, teamId)

	var r0 error
	if rf, ok := ret.Get(0).(func(string, string) error); ok {
		r0 = rf(userId, teamId)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// CreateSidebarCategory provides a mock function with given fields: userId, teamId, newCategory
func (_m *ChannelStore) CreateSidebarCategory(userId string, teamId string, newCategory *model.SidebarCategoryWithChannels) (*model.SidebarCategoryWithChannels, *model.AppError) {
	ret := _m.Called(userId, teamId, newCategory)

	var r0 *model.SidebarCategoryWithChannels
	if rf, ok := ret.Get(0).(func(string, string, *model.SidebarCategoryWithChannels) *model.SidebarCategoryWithChannels); ok {
		r0 = rf(userId, teamId, newCategory)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.SidebarCategoryWithChannels)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string, *model.SidebarCategoryWithChannels) *model.AppError); ok {
		r1 = rf(userId, teamId, newCategory)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// Delete provides a mock function with given fields: channelId, time
func (_m *ChannelStore) Delete(channelId string, time int64) error {
	ret := _m.Called(channelId, time)

	var r0 error
	if rf, ok := ret.Get(0).(func(string, int64) error); ok {
		r0 = rf(channelId, time)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// DeleteSidebarCategory provides a mock function with given fields: categoryId
func (_m *ChannelStore) DeleteSidebarCategory(categoryId string) *model.AppError {
	ret := _m.Called(categoryId)

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
		r0 = rf(categoryId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// DeleteSidebarChannelsByPreferences provides a mock function with given fields: preferences
func (_m *ChannelStore) DeleteSidebarChannelsByPreferences(preferences *model.Preferences) error {
	ret := _m.Called(preferences)

	var r0 error
	if rf, ok := ret.Get(0).(func(*model.Preferences) error); ok {
		r0 = rf(preferences)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Get provides a mock function with given fields: id, allowFromCache
func (_m *ChannelStore) Get(id string, allowFromCache bool) (*model.Channel, error) {
	ret := _m.Called(id, allowFromCache)

	var r0 *model.Channel
	if rf, ok := ret.Get(0).(func(string, bool) *model.Channel); ok {
		r0 = rf(id, allowFromCache)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Channel)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, bool) error); ok {
		r1 = rf(id, allowFromCache)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetAll provides a mock function with given fields: teamId
func (_m *ChannelStore) GetAll(teamId string) ([]*model.Channel, *model.AppError) {
	ret := _m.Called(teamId)

	var r0 []*model.Channel
	if rf, ok := ret.Get(0).(func(string) []*model.Channel); ok {
		r0 = rf(teamId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.Channel)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
		r1 = rf(teamId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetAllChannelMembersForUser provides a mock function with given fields: userId, allowFromCache, includeDeleted
func (_m *ChannelStore) GetAllChannelMembersForUser(userId string, allowFromCache bool, includeDeleted bool) (map[string]string, *model.AppError) {
	ret := _m.Called(userId, allowFromCache, includeDeleted)

	var r0 map[string]string
	if rf, ok := ret.Get(0).(func(string, bool, bool) map[string]string); ok {
		r0 = rf(userId, allowFromCache, includeDeleted)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string]string)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, bool, bool) *model.AppError); ok {
		r1 = rf(userId, allowFromCache, includeDeleted)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetAllChannelMembersNotifyPropsForChannel provides a mock function with given fields: channelId, allowFromCache
func (_m *ChannelStore) GetAllChannelMembersNotifyPropsForChannel(channelId string, allowFromCache bool) (map[string]model.StringMap, *model.AppError) {
	ret := _m.Called(channelId, allowFromCache)

	var r0 map[string]model.StringMap
	if rf, ok := ret.Get(0).(func(string, bool) map[string]model.StringMap); ok {
		r0 = rf(channelId, allowFromCache)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string]model.StringMap)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok {
		r1 = rf(channelId, allowFromCache)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetAllChannels provides a mock function with given fields: page, perPage, opts
func (_m *ChannelStore) GetAllChannels(page int, perPage int, opts store.ChannelSearchOpts) (*model.ChannelListWithTeamData, error) {
	ret := _m.Called(page, perPage, opts)

	var r0 *model.ChannelListWithTeamData
	if rf, ok := ret.Get(0).(func(int, int, store.ChannelSearchOpts) *model.ChannelListWithTeamData); ok {
		r0 = rf(page, perPage, opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelListWithTeamData)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(int, int, store.ChannelSearchOpts) error); ok {
		r1 = rf(page, perPage, opts)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetAllChannelsCount provides a mock function with given fields: opts
func (_m *ChannelStore) GetAllChannelsCount(opts store.ChannelSearchOpts) (int64, error) {
	ret := _m.Called(opts)

	var r0 int64
	if rf, ok := ret.Get(0).(func(store.ChannelSearchOpts) int64); ok {
		r0 = rf(opts)
	} else {
		r0 = ret.Get(0).(int64)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(store.ChannelSearchOpts) error); ok {
		r1 = rf(opts)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetAllChannelsForExportAfter provides a mock function with given fields: limit, afterId
func (_m *ChannelStore) GetAllChannelsForExportAfter(limit int, afterId string) ([]*model.ChannelForExport, *model.AppError) {
	ret := _m.Called(limit, afterId)

	var r0 []*model.ChannelForExport
	if rf, ok := ret.Get(0).(func(int, string) []*model.ChannelForExport); ok {
		r0 = rf(limit, afterId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.ChannelForExport)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(int, string) *model.AppError); ok {
		r1 = rf(limit, afterId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetAllDirectChannelsForExportAfter provides a mock function with given fields: limit, afterId
func (_m *ChannelStore) GetAllDirectChannelsForExportAfter(limit int, afterId string) ([]*model.DirectChannelForExport, *model.AppError) {
	ret := _m.Called(limit, afterId)

	var r0 []*model.DirectChannelForExport
	if rf, ok := ret.Get(0).(func(int, string) []*model.DirectChannelForExport); ok {
		r0 = rf(limit, afterId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.DirectChannelForExport)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(int, string) *model.AppError); ok {
		r1 = rf(limit, afterId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetByName provides a mock function with given fields: team_id, name, allowFromCache
func (_m *ChannelStore) GetByName(team_id string, name string, allowFromCache bool) (*model.Channel, error) {
	ret := _m.Called(team_id, name, allowFromCache)

	var r0 *model.Channel
	if rf, ok := ret.Get(0).(func(string, string, bool) *model.Channel); ok {
		r0 = rf(team_id, name, allowFromCache)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Channel)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, string, bool) error); ok {
		r1 = rf(team_id, name, allowFromCache)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetByNameIncludeDeleted provides a mock function with given fields: team_id, name, allowFromCache
func (_m *ChannelStore) GetByNameIncludeDeleted(team_id string, name string, allowFromCache bool) (*model.Channel, error) {
	ret := _m.Called(team_id, name, allowFromCache)

	var r0 *model.Channel
	if rf, ok := ret.Get(0).(func(string, string, bool) *model.Channel); ok {
		r0 = rf(team_id, name, allowFromCache)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Channel)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, string, bool) error); ok {
		r1 = rf(team_id, name, allowFromCache)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetByNames provides a mock function with given fields: team_id, names, allowFromCache
func (_m *ChannelStore) GetByNames(team_id string, names []string, allowFromCache bool) ([]*model.Channel, error) {
	ret := _m.Called(team_id, names, allowFromCache)

	var r0 []*model.Channel
	if rf, ok := ret.Get(0).(func(string, []string, bool) []*model.Channel); ok {
		r0 = rf(team_id, names, allowFromCache)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.Channel)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, []string, bool) error); ok {
		r1 = rf(team_id, names, allowFromCache)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetChannelCounts provides a mock function with given fields: teamId, userId
func (_m *ChannelStore) GetChannelCounts(teamId string, userId string) (*model.ChannelCounts, *model.AppError) {
	ret := _m.Called(teamId, userId)

	var r0 *model.ChannelCounts
	if rf, ok := ret.Get(0).(func(string, string) *model.ChannelCounts); ok {
		r0 = rf(teamId, userId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelCounts)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
		r1 = rf(teamId, userId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetChannelMembersForExport provides a mock function with given fields: userId, teamId
func (_m *ChannelStore) GetChannelMembersForExport(userId string, teamId string) ([]*model.ChannelMemberForExport, *model.AppError) {
	ret := _m.Called(userId, teamId)

	var r0 []*model.ChannelMemberForExport
	if rf, ok := ret.Get(0).(func(string, string) []*model.ChannelMemberForExport); ok {
		r0 = rf(userId, teamId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.ChannelMemberForExport)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
		r1 = rf(userId, teamId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetChannelMembersTimezones provides a mock function with given fields: channelId
func (_m *ChannelStore) GetChannelMembersTimezones(channelId string) ([]model.StringMap, *model.AppError) {
	ret := _m.Called(channelId)

	var r0 []model.StringMap
	if rf, ok := ret.Get(0).(func(string) []model.StringMap); ok {
		r0 = rf(channelId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]model.StringMap)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
		r1 = rf(channelId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetChannelUnread provides a mock function with given fields: channelId, userId
func (_m *ChannelStore) GetChannelUnread(channelId string, userId string) (*model.ChannelUnread, *model.AppError) {
	ret := _m.Called(channelId, userId)

	var r0 *model.ChannelUnread
	if rf, ok := ret.Get(0).(func(string, string) *model.ChannelUnread); ok {
		r0 = rf(channelId, userId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelUnread)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
		r1 = rf(channelId, userId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetChannels provides a mock function with given fields: teamId, userId, includeDeleted, lastDeleteAt
func (_m *ChannelStore) GetChannels(teamId string, userId string, includeDeleted bool, lastDeleteAt int) (*model.ChannelList, error) {
	ret := _m.Called(teamId, userId, includeDeleted, lastDeleteAt)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, string, bool, int) *model.ChannelList); ok {
		r0 = rf(teamId, userId, includeDeleted, lastDeleteAt)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, string, bool, int) error); ok {
		r1 = rf(teamId, userId, includeDeleted, lastDeleteAt)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetChannelsBatchForIndexing provides a mock function with given fields: startTime, endTime, limit
func (_m *ChannelStore) GetChannelsBatchForIndexing(startTime int64, endTime int64, limit int) ([]*model.Channel, *model.AppError) {
	ret := _m.Called(startTime, endTime, limit)

	var r0 []*model.Channel
	if rf, ok := ret.Get(0).(func(int64, int64, int) []*model.Channel); ok {
		r0 = rf(startTime, endTime, limit)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.Channel)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(int64, int64, int) *model.AppError); ok {
		r1 = rf(startTime, endTime, limit)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetChannelsByIds provides a mock function with given fields: channelIds, includeDeleted
func (_m *ChannelStore) GetChannelsByIds(channelIds []string, includeDeleted bool) ([]*model.Channel, *model.AppError) {
	ret := _m.Called(channelIds, includeDeleted)

	var r0 []*model.Channel
	if rf, ok := ret.Get(0).(func([]string, bool) []*model.Channel); ok {
		r0 = rf(channelIds, includeDeleted)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.Channel)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func([]string, bool) *model.AppError); ok {
		r1 = rf(channelIds, includeDeleted)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetChannelsByScheme provides a mock function with given fields: schemeId, offset, limit
func (_m *ChannelStore) GetChannelsByScheme(schemeId string, offset int, limit int) (model.ChannelList, *model.AppError) {
	ret := _m.Called(schemeId, offset, limit)

	var r0 model.ChannelList
	if rf, ok := ret.Get(0).(func(string, int, int) model.ChannelList); ok {
		r0 = rf(schemeId, offset, limit)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(model.ChannelList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
		r1 = rf(schemeId, offset, limit)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetDeleted provides a mock function with given fields: team_id, offset, limit, userId
func (_m *ChannelStore) GetDeleted(team_id string, offset int, limit int, userId string) (*model.ChannelList, error) {
	ret := _m.Called(team_id, offset, limit, userId)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, int, int, string) *model.ChannelList); ok {
		r0 = rf(team_id, offset, limit, userId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, int, int, string) error); ok {
		r1 = rf(team_id, offset, limit, userId)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetDeletedByName provides a mock function with given fields: team_id, name
func (_m *ChannelStore) GetDeletedByName(team_id string, name string) (*model.Channel, error) {
	ret := _m.Called(team_id, name)

	var r0 *model.Channel
	if rf, ok := ret.Get(0).(func(string, string) *model.Channel); ok {
		r0 = rf(team_id, name)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Channel)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, string) error); ok {
		r1 = rf(team_id, name)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetForPost provides a mock function with given fields: postId
func (_m *ChannelStore) GetForPost(postId string) (*model.Channel, *model.AppError) {
	ret := _m.Called(postId)

	var r0 *model.Channel
	if rf, ok := ret.Get(0).(func(string) *model.Channel); ok {
		r0 = rf(postId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Channel)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
		r1 = rf(postId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetFromMaster provides a mock function with given fields: id
func (_m *ChannelStore) GetFromMaster(id string) (*model.Channel, error) {
	ret := _m.Called(id)

	var r0 *model.Channel
	if rf, ok := ret.Get(0).(func(string) *model.Channel); ok {
		r0 = rf(id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Channel)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string) error); ok {
		r1 = rf(id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetGuestCount provides a mock function with given fields: channelId, allowFromCache
func (_m *ChannelStore) GetGuestCount(channelId string, allowFromCache bool) (int64, *model.AppError) {
	ret := _m.Called(channelId, allowFromCache)

	var r0 int64
	if rf, ok := ret.Get(0).(func(string, bool) int64); ok {
		r0 = rf(channelId, allowFromCache)
	} else {
		r0 = ret.Get(0).(int64)
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok {
		r1 = rf(channelId, allowFromCache)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetMember provides a mock function with given fields: channelId, userId
func (_m *ChannelStore) GetMember(channelId string, userId string) (*model.ChannelMember, *model.AppError) {
	ret := _m.Called(channelId, userId)

	var r0 *model.ChannelMember
	if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok {
		r0 = rf(channelId, userId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelMember)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
		r1 = rf(channelId, userId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetMemberCount provides a mock function with given fields: channelId, allowFromCache
func (_m *ChannelStore) GetMemberCount(channelId string, allowFromCache bool) (int64, *model.AppError) {
	ret := _m.Called(channelId, allowFromCache)

	var r0 int64
	if rf, ok := ret.Get(0).(func(string, bool) int64); ok {
		r0 = rf(channelId, allowFromCache)
	} else {
		r0 = ret.Get(0).(int64)
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok {
		r1 = rf(channelId, allowFromCache)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetMemberCountFromCache provides a mock function with given fields: channelId
func (_m *ChannelStore) GetMemberCountFromCache(channelId string) int64 {
	ret := _m.Called(channelId)

	var r0 int64
	if rf, ok := ret.Get(0).(func(string) int64); ok {
		r0 = rf(channelId)
	} else {
		r0 = ret.Get(0).(int64)
	}

	return r0
}

// GetMemberCountsByGroup provides a mock function with given fields: channelID, includeTimezones
func (_m *ChannelStore) GetMemberCountsByGroup(channelID string, includeTimezones bool) ([]*model.ChannelMemberCountByGroup, *model.AppError) {
	ret := _m.Called(channelID, includeTimezones)

	var r0 []*model.ChannelMemberCountByGroup
	if rf, ok := ret.Get(0).(func(string, bool) []*model.ChannelMemberCountByGroup); ok {
		r0 = rf(channelID, includeTimezones)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.ChannelMemberCountByGroup)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok {
		r1 = rf(channelID, includeTimezones)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetMemberForPost provides a mock function with given fields: postId, userId
func (_m *ChannelStore) GetMemberForPost(postId string, userId string) (*model.ChannelMember, *model.AppError) {
	ret := _m.Called(postId, userId)

	var r0 *model.ChannelMember
	if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMember); ok {
		r0 = rf(postId, userId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelMember)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
		r1 = rf(postId, userId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetMembers provides a mock function with given fields: channelId, offset, limit
func (_m *ChannelStore) GetMembers(channelId string, offset int, limit int) (*model.ChannelMembers, *model.AppError) {
	ret := _m.Called(channelId, offset, limit)

	var r0 *model.ChannelMembers
	if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelMembers); ok {
		r0 = rf(channelId, offset, limit)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelMembers)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
		r1 = rf(channelId, offset, limit)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetMembersByIds provides a mock function with given fields: channelId, userIds
func (_m *ChannelStore) GetMembersByIds(channelId string, userIds []string) (*model.ChannelMembers, *model.AppError) {
	ret := _m.Called(channelId, userIds)

	var r0 *model.ChannelMembers
	if rf, ok := ret.Get(0).(func(string, []string) *model.ChannelMembers); ok {
		r0 = rf(channelId, userIds)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelMembers)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok {
		r1 = rf(channelId, userIds)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetMembersForUser provides a mock function with given fields: teamId, userId
func (_m *ChannelStore) GetMembersForUser(teamId string, userId string) (*model.ChannelMembers, *model.AppError) {
	ret := _m.Called(teamId, userId)

	var r0 *model.ChannelMembers
	if rf, ok := ret.Get(0).(func(string, string) *model.ChannelMembers); ok {
		r0 = rf(teamId, userId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelMembers)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
		r1 = rf(teamId, userId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetMembersForUserWithPagination provides a mock function with given fields: teamId, userId, page, perPage
func (_m *ChannelStore) GetMembersForUserWithPagination(teamId string, userId string, page int, perPage int) (*model.ChannelMembers, *model.AppError) {
	ret := _m.Called(teamId, userId, page, perPage)

	var r0 *model.ChannelMembers
	if rf, ok := ret.Get(0).(func(string, string, int, int) *model.ChannelMembers); ok {
		r0 = rf(teamId, userId, page, perPage)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelMembers)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string, int, int) *model.AppError); ok {
		r1 = rf(teamId, userId, page, perPage)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetMoreChannels provides a mock function with given fields: teamId, userId, offset, limit
func (_m *ChannelStore) GetMoreChannels(teamId string, userId string, offset int, limit int) (*model.ChannelList, error) {
	ret := _m.Called(teamId, userId, offset, limit)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, string, int, int) *model.ChannelList); ok {
		r0 = rf(teamId, userId, offset, limit)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, string, int, int) error); ok {
		r1 = rf(teamId, userId, offset, limit)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// GetPinnedPostCount provides a mock function with given fields: channelId, allowFromCache
func (_m *ChannelStore) GetPinnedPostCount(channelId string, allowFromCache bool) (int64, *model.AppError) {
	ret := _m.Called(channelId, allowFromCache)

	var r0 int64
	if rf, ok := ret.Get(0).(func(string, bool) int64); ok {
		r0 = rf(channelId, allowFromCache)
	} else {
		r0 = ret.Get(0).(int64)
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, bool) *model.AppError); ok {
		r1 = rf(channelId, allowFromCache)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetPinnedPosts provides a mock function with given fields: channelId
func (_m *ChannelStore) GetPinnedPosts(channelId string) (*model.PostList, *model.AppError) {
	ret := _m.Called(channelId)

	var r0 *model.PostList
	if rf, ok := ret.Get(0).(func(string) *model.PostList); ok {
		r0 = rf(channelId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.PostList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
		r1 = rf(channelId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetPrivateChannelsForTeam provides a mock function with given fields: teamId, offset, limit
func (_m *ChannelStore) GetPrivateChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) {
	ret := _m.Called(teamId, offset, limit)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelList); ok {
		r0 = rf(teamId, offset, limit)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
		r1 = rf(teamId, offset, limit)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetPublicChannelsByIdsForTeam provides a mock function with given fields: teamId, channelIds
func (_m *ChannelStore) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*model.ChannelList, *model.AppError) {
	ret := _m.Called(teamId, channelIds)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, []string) *model.ChannelList); ok {
		r0 = rf(teamId, channelIds)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok {
		r1 = rf(teamId, channelIds)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetPublicChannelsForTeam provides a mock function with given fields: teamId, offset, limit
func (_m *ChannelStore) GetPublicChannelsForTeam(teamId string, offset int, limit int) (*model.ChannelList, *model.AppError) {
	ret := _m.Called(teamId, offset, limit)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, int, int) *model.ChannelList); ok {
		r0 = rf(teamId, offset, limit)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, int, int) *model.AppError); ok {
		r1 = rf(teamId, offset, limit)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetSidebarCategories provides a mock function with given fields: userId, teamId
func (_m *ChannelStore) GetSidebarCategories(userId string, teamId string) (*model.OrderedSidebarCategories, *model.AppError) {
	ret := _m.Called(userId, teamId)

	var r0 *model.OrderedSidebarCategories
	if rf, ok := ret.Get(0).(func(string, string) *model.OrderedSidebarCategories); ok {
		r0 = rf(userId, teamId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.OrderedSidebarCategories)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
		r1 = rf(userId, teamId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetSidebarCategory provides a mock function with given fields: categoryId
func (_m *ChannelStore) GetSidebarCategory(categoryId string) (*model.SidebarCategoryWithChannels, *model.AppError) {
	ret := _m.Called(categoryId)

	var r0 *model.SidebarCategoryWithChannels
	if rf, ok := ret.Get(0).(func(string) *model.SidebarCategoryWithChannels); ok {
		r0 = rf(categoryId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.SidebarCategoryWithChannels)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
		r1 = rf(categoryId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetSidebarCategoryOrder provides a mock function with given fields: userId, teamId
func (_m *ChannelStore) GetSidebarCategoryOrder(userId string, teamId string) ([]string, *model.AppError) {
	ret := _m.Called(userId, teamId)

	var r0 []string
	if rf, ok := ret.Get(0).(func(string, string) []string); ok {
		r0 = rf(userId, teamId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
		r1 = rf(userId, teamId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GetTeamChannels provides a mock function with given fields: teamId
func (_m *ChannelStore) GetTeamChannels(teamId string) (*model.ChannelList, *model.AppError) {
	ret := _m.Called(teamId)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string) *model.ChannelList); ok {
		r0 = rf(teamId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
		r1 = rf(teamId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// GroupSyncedChannelCount provides a mock function with given fields:
func (_m *ChannelStore) GroupSyncedChannelCount() (int64, *model.AppError) {
	ret := _m.Called()

	var r0 int64
	if rf, ok := ret.Get(0).(func() int64); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(int64)
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func() *model.AppError); ok {
		r1 = rf()
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// IncrementMentionCount provides a mock function with given fields: channelId, userId
func (_m *ChannelStore) IncrementMentionCount(channelId string, userId string) *model.AppError {
	ret := _m.Called(channelId, userId)

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
		r0 = rf(channelId, userId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// InvalidateAllChannelMembersForUser provides a mock function with given fields: userId
func (_m *ChannelStore) InvalidateAllChannelMembersForUser(userId string) {
	_m.Called(userId)
}

// InvalidateCacheForChannelMembersNotifyProps provides a mock function with given fields: channelId
func (_m *ChannelStore) InvalidateCacheForChannelMembersNotifyProps(channelId string) {
	_m.Called(channelId)
}

// InvalidateChannel provides a mock function with given fields: id
func (_m *ChannelStore) InvalidateChannel(id string) {
	_m.Called(id)
}

// InvalidateChannelByName provides a mock function with given fields: teamId, name
func (_m *ChannelStore) InvalidateChannelByName(teamId string, name string) {
	_m.Called(teamId, name)
}

// InvalidateGuestCount provides a mock function with given fields: channelId
func (_m *ChannelStore) InvalidateGuestCount(channelId string) {
	_m.Called(channelId)
}

// InvalidateMemberCount provides a mock function with given fields: channelId
func (_m *ChannelStore) InvalidateMemberCount(channelId string) {
	_m.Called(channelId)
}

// InvalidatePinnedPostCount provides a mock function with given fields: channelId
func (_m *ChannelStore) InvalidatePinnedPostCount(channelId string) {
	_m.Called(channelId)
}

// IsUserInChannelUseCache provides a mock function with given fields: userId, channelId
func (_m *ChannelStore) IsUserInChannelUseCache(userId string, channelId string) bool {
	ret := _m.Called(userId, channelId)

	var r0 bool
	if rf, ok := ret.Get(0).(func(string, string) bool); ok {
		r0 = rf(userId, channelId)
	} else {
		r0 = ret.Get(0).(bool)
	}

	return r0
}

// MigrateChannelMembers provides a mock function with given fields: fromChannelId, fromUserId
func (_m *ChannelStore) MigrateChannelMembers(fromChannelId string, fromUserId string) (map[string]string, *model.AppError) {
	ret := _m.Called(fromChannelId, fromUserId)

	var r0 map[string]string
	if rf, ok := ret.Get(0).(func(string, string) map[string]string); ok {
		r0 = rf(fromChannelId, fromUserId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string]string)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
		r1 = rf(fromChannelId, fromUserId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// MigratePublicChannels provides a mock function with given fields:
func (_m *ChannelStore) MigratePublicChannels() error {
	ret := _m.Called()

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// PermanentDelete provides a mock function with given fields: channelId
func (_m *ChannelStore) PermanentDelete(channelId string) error {
	ret := _m.Called(channelId)

	var r0 error
	if rf, ok := ret.Get(0).(func(string) error); ok {
		r0 = rf(channelId)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// PermanentDeleteByTeam provides a mock function with given fields: teamId
func (_m *ChannelStore) PermanentDeleteByTeam(teamId string) error {
	ret := _m.Called(teamId)

	var r0 error
	if rf, ok := ret.Get(0).(func(string) error); ok {
		r0 = rf(teamId)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// PermanentDeleteMembersByChannel provides a mock function with given fields: channelId
func (_m *ChannelStore) PermanentDeleteMembersByChannel(channelId string) *model.AppError {
	ret := _m.Called(channelId)

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
		r0 = rf(channelId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// PermanentDeleteMembersByUser provides a mock function with given fields: userId
func (_m *ChannelStore) PermanentDeleteMembersByUser(userId string) *model.AppError {
	ret := _m.Called(userId)

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
		r0 = rf(userId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// RemoveAllDeactivatedMembers provides a mock function with given fields: channelId
func (_m *ChannelStore) RemoveAllDeactivatedMembers(channelId string) *model.AppError {
	ret := _m.Called(channelId)

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
		r0 = rf(channelId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// RemoveMember provides a mock function with given fields: channelId, userId
func (_m *ChannelStore) RemoveMember(channelId string, userId string) *model.AppError {
	ret := _m.Called(channelId, userId)

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
		r0 = rf(channelId, userId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// RemoveMembers provides a mock function with given fields: channelId, userIds
func (_m *ChannelStore) RemoveMembers(channelId string, userIds []string) *model.AppError {
	ret := _m.Called(channelId, userIds)

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok {
		r0 = rf(channelId, userIds)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// ResetAllChannelSchemes provides a mock function with given fields:
func (_m *ChannelStore) ResetAllChannelSchemes() *model.AppError {
	ret := _m.Called()

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func() *model.AppError); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// Restore provides a mock function with given fields: channelId, time
func (_m *ChannelStore) Restore(channelId string, time int64) error {
	ret := _m.Called(channelId, time)

	var r0 error
	if rf, ok := ret.Get(0).(func(string, int64) error); ok {
		r0 = rf(channelId, time)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Save provides a mock function with given fields: channel, maxChannelsPerTeam
func (_m *ChannelStore) Save(channel *model.Channel, maxChannelsPerTeam int64) (*model.Channel, error) {
	ret := _m.Called(channel, maxChannelsPerTeam)

	var r0 *model.Channel
	if rf, ok := ret.Get(0).(func(*model.Channel, int64) *model.Channel); ok {
		r0 = rf(channel, maxChannelsPerTeam)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Channel)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(*model.Channel, int64) error); ok {
		r1 = rf(channel, maxChannelsPerTeam)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// SaveDirectChannel provides a mock function with given fields: channel, member1, member2
func (_m *ChannelStore) SaveDirectChannel(channel *model.Channel, member1 *model.ChannelMember, member2 *model.ChannelMember) (*model.Channel, error) {
	ret := _m.Called(channel, member1, member2)

	var r0 *model.Channel
	if rf, ok := ret.Get(0).(func(*model.Channel, *model.ChannelMember, *model.ChannelMember) *model.Channel); ok {
		r0 = rf(channel, member1, member2)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Channel)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(*model.Channel, *model.ChannelMember, *model.ChannelMember) error); ok {
		r1 = rf(channel, member1, member2)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// SaveMember provides a mock function with given fields: member
func (_m *ChannelStore) SaveMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError) {
	ret := _m.Called(member)

	var r0 *model.ChannelMember
	if rf, ok := ret.Get(0).(func(*model.ChannelMember) *model.ChannelMember); ok {
		r0 = rf(member)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelMember)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(*model.ChannelMember) *model.AppError); ok {
		r1 = rf(member)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// SaveMultipleMembers provides a mock function with given fields: members
func (_m *ChannelStore) SaveMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, *model.AppError) {
	ret := _m.Called(members)

	var r0 []*model.ChannelMember
	if rf, ok := ret.Get(0).(func([]*model.ChannelMember) []*model.ChannelMember); ok {
		r0 = rf(members)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.ChannelMember)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func([]*model.ChannelMember) *model.AppError); ok {
		r1 = rf(members)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// SearchAllChannels provides a mock function with given fields: term, opts
func (_m *ChannelStore) SearchAllChannels(term string, opts store.ChannelSearchOpts) (*model.ChannelListWithTeamData, int64, *model.AppError) {
	ret := _m.Called(term, opts)

	var r0 *model.ChannelListWithTeamData
	if rf, ok := ret.Get(0).(func(string, store.ChannelSearchOpts) *model.ChannelListWithTeamData); ok {
		r0 = rf(term, opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelListWithTeamData)
		}
	}

	var r1 int64
	if rf, ok := ret.Get(1).(func(string, store.ChannelSearchOpts) int64); ok {
		r1 = rf(term, opts)
	} else {
		r1 = ret.Get(1).(int64)
	}

	var r2 *model.AppError
	if rf, ok := ret.Get(2).(func(string, store.ChannelSearchOpts) *model.AppError); ok {
		r2 = rf(term, opts)
	} else {
		if ret.Get(2) != nil {
			r2 = ret.Get(2).(*model.AppError)
		}
	}

	return r0, r1, r2
}

// SearchArchivedInTeam provides a mock function with given fields: teamId, term, userId
func (_m *ChannelStore) SearchArchivedInTeam(teamId string, term string, userId string) (*model.ChannelList, *model.AppError) {
	ret := _m.Called(teamId, term, userId)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelList); ok {
		r0 = rf(teamId, term, userId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok {
		r1 = rf(teamId, term, userId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// SearchForUserInTeam provides a mock function with given fields: userId, teamId, term, includeDeleted
func (_m *ChannelStore) SearchForUserInTeam(userId string, teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
	ret := _m.Called(userId, teamId, term, includeDeleted)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, string, string, bool) *model.ChannelList); ok {
		r0 = rf(userId, teamId, term, includeDeleted)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string, string, bool) *model.AppError); ok {
		r1 = rf(userId, teamId, term, includeDeleted)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// SearchGroupChannels provides a mock function with given fields: userId, term
func (_m *ChannelStore) SearchGroupChannels(userId string, term string) (*model.ChannelList, *model.AppError) {
	ret := _m.Called(userId, term)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, string) *model.ChannelList); ok {
		r0 = rf(userId, term)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
		r1 = rf(userId, term)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// SearchInTeam provides a mock function with given fields: teamId, term, includeDeleted
func (_m *ChannelStore) SearchInTeam(teamId string, term string, includeDeleted bool) (*model.ChannelList, *model.AppError) {
	ret := _m.Called(teamId, term, includeDeleted)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, string, bool) *model.ChannelList); ok {
		r0 = rf(teamId, term, includeDeleted)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string, bool) *model.AppError); ok {
		r1 = rf(teamId, term, includeDeleted)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// SearchMore provides a mock function with given fields: userId, teamId, term
func (_m *ChannelStore) SearchMore(userId string, teamId string, term string) (*model.ChannelList, *model.AppError) {
	ret := _m.Called(userId, teamId, term)

	var r0 *model.ChannelList
	if rf, ok := ret.Get(0).(func(string, string, string) *model.ChannelList); ok {
		r0 = rf(userId, teamId, term)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelList)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok {
		r1 = rf(userId, teamId, term)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// SetDeleteAt provides a mock function with given fields: channelId, deleteAt, updateAt
func (_m *ChannelStore) SetDeleteAt(channelId string, deleteAt int64, updateAt int64) error {
	ret := _m.Called(channelId, deleteAt, updateAt)

	var r0 error
	if rf, ok := ret.Get(0).(func(string, int64, int64) error); ok {
		r0 = rf(channelId, deleteAt, updateAt)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Update provides a mock function with given fields: channel
func (_m *ChannelStore) Update(channel *model.Channel) (*model.Channel, error) {
	ret := _m.Called(channel)

	var r0 *model.Channel
	if rf, ok := ret.Get(0).(func(*model.Channel) *model.Channel); ok {
		r0 = rf(channel)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Channel)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(*model.Channel) error); ok {
		r1 = rf(channel)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// UpdateLastViewedAt provides a mock function with given fields: channelIds, userId
func (_m *ChannelStore) UpdateLastViewedAt(channelIds []string, userId string) (map[string]int64, *model.AppError) {
	ret := _m.Called(channelIds, userId)

	var r0 map[string]int64
	if rf, ok := ret.Get(0).(func([]string, string) map[string]int64); ok {
		r0 = rf(channelIds, userId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string]int64)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func([]string, string) *model.AppError); ok {
		r1 = rf(channelIds, userId)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// UpdateLastViewedAtPost provides a mock function with given fields: unreadPost, userID, mentionCount
func (_m *ChannelStore) UpdateLastViewedAtPost(unreadPost *model.Post, userID string, mentionCount int) (*model.ChannelUnreadAt, *model.AppError) {
	ret := _m.Called(unreadPost, userID, mentionCount)

	var r0 *model.ChannelUnreadAt
	if rf, ok := ret.Get(0).(func(*model.Post, string, int) *model.ChannelUnreadAt); ok {
		r0 = rf(unreadPost, userID, mentionCount)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelUnreadAt)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(*model.Post, string, int) *model.AppError); ok {
		r1 = rf(unreadPost, userID, mentionCount)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// UpdateMember provides a mock function with given fields: member
func (_m *ChannelStore) UpdateMember(member *model.ChannelMember) (*model.ChannelMember, *model.AppError) {
	ret := _m.Called(member)

	var r0 *model.ChannelMember
	if rf, ok := ret.Get(0).(func(*model.ChannelMember) *model.ChannelMember); ok {
		r0 = rf(member)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.ChannelMember)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(*model.ChannelMember) *model.AppError); ok {
		r1 = rf(member)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// UpdateMembersRole provides a mock function with given fields: channelID, userIDs
func (_m *ChannelStore) UpdateMembersRole(channelID string, userIDs []string) *model.AppError {
	ret := _m.Called(channelID, userIDs)

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func(string, []string) *model.AppError); ok {
		r0 = rf(channelID, userIDs)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// UpdateMultipleMembers provides a mock function with given fields: members
func (_m *ChannelStore) UpdateMultipleMembers(members []*model.ChannelMember) ([]*model.ChannelMember, *model.AppError) {
	ret := _m.Called(members)

	var r0 []*model.ChannelMember
	if rf, ok := ret.Get(0).(func([]*model.ChannelMember) []*model.ChannelMember); ok {
		r0 = rf(members)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.ChannelMember)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func([]*model.ChannelMember) *model.AppError); ok {
		r1 = rf(members)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// UpdateSidebarCategories provides a mock function with given fields: userId, teamId, categories
func (_m *ChannelStore) UpdateSidebarCategories(userId string, teamId string, categories []*model.SidebarCategoryWithChannels) ([]*model.SidebarCategoryWithChannels, *model.AppError) {
	ret := _m.Called(userId, teamId, categories)

	var r0 []*model.SidebarCategoryWithChannels
	if rf, ok := ret.Get(0).(func(string, string, []*model.SidebarCategoryWithChannels) []*model.SidebarCategoryWithChannels); ok {
		r0 = rf(userId, teamId, categories)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.SidebarCategoryWithChannels)
		}
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, string, []*model.SidebarCategoryWithChannels) *model.AppError); ok {
		r1 = rf(userId, teamId, categories)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}

// UpdateSidebarCategoryOrder provides a mock function with given fields: userId, teamId, categoryOrder
func (_m *ChannelStore) UpdateSidebarCategoryOrder(userId string, teamId string, categoryOrder []string) *model.AppError {
	ret := _m.Called(userId, teamId, categoryOrder)

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func(string, string, []string) *model.AppError); ok {
		r0 = rf(userId, teamId, categoryOrder)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// UpdateSidebarChannelCategoryOnMove provides a mock function with given fields: channel, newTeamId
func (_m *ChannelStore) UpdateSidebarChannelCategoryOnMove(channel *model.Channel, newTeamId string) *model.AppError {
	ret := _m.Called(channel, newTeamId)

	var r0 *model.AppError
	if rf, ok := ret.Get(0).(func(*model.Channel, string) *model.AppError); ok {
		r0 = rf(channel, newTeamId)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.AppError)
		}
	}

	return r0
}

// UpdateSidebarChannelsByPreferences provides a mock function with given fields: preferences
func (_m *ChannelStore) UpdateSidebarChannelsByPreferences(preferences *model.Preferences) error {
	ret := _m.Called(preferences)

	var r0 error
	if rf, ok := ret.Get(0).(func(*model.Preferences) error); ok {
		r0 = rf(preferences)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// UserBelongsToChannels provides a mock function with given fields: userId, channelIds
func (_m *ChannelStore) UserBelongsToChannels(userId string, channelIds []string) (bool, *model.AppError) {
	ret := _m.Called(userId, channelIds)

	var r0 bool
	if rf, ok := ret.Get(0).(func(string, []string) bool); ok {
		r0 = rf(userId, channelIds)
	} else {
		r0 = ret.Get(0).(bool)
	}

	var r1 *model.AppError
	if rf, ok := ret.Get(1).(func(string, []string) *model.AppError); ok {
		r1 = rf(userId, channelIds)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(*model.AppError)
		}
	}

	return r0, r1
}
